package com.lmn.actuator;

import org.springframework.boot.actuate.health.AbstractHealthIndicator;
import org.springframework.boot.actuate.health.Health;
import org.springframework.stereotype.Component;

/**
 * @describe: 通过继承抽象父类的方式实现对health的扩展
 */
@Component("myHealth_abstract")
public class MyHealthIndicator1 extends AbstractHealthIndicator {
    @Override
    protected void doHealthCheck(Health.Builder builder) throws Exception {
        builder.up().withDetail("xxx", "xxxyyy");
    }
}